const mongoose = require('mongoose');//引入mongoose
const completedTestSchema = new mongoose.Schema({
    score:String,
    user_id: {
        type: mongoose.SchemaTypes.ObjectId,
        //关联集合模型，集合模型名在mongoose.model注册的名字
        ref:'userModel'
    },
    test_id: {
        type: mongoose.SchemaTypes.ObjectId,
        //关联集合模型，集合模型名在mongoose.model注册的名字
        ref:'testModel'
    }
});

const completedTestModel = mongoose.model("completedTestModel", completedTestSchema, "completedTest");
module.exports = {completedTestModel}